package com.avic.rong.adapter;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Creater: Created by wangyz on 2018/12/26.
 * Email: 936804097@qq.com
 */
public class SpaceItemHorizontalDecoration extends RecyclerView.ItemDecoration {

    private final int normal;
    private final int margin;


    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        super.getItemOffsets(outRect, view, parent, state);

//        outRect.top = normal;
//        outRect.bottom = normal;
        outRect.right = margin;
        outRect.left = normal;

    }

    public SpaceItemHorizontalDecoration(int normal, int margin) {
        this.normal = normal;
        this.margin = margin;
    }

}
